﻿using System;

namespace Borg
{
    public class InvokeMethodInfo
    {
        public object[] Arguments { get; set; }
        public Delegate Method { get; set; }
        public object Result { get; set; }


        public InvokeMethodInfo(Delegate method, params object[] arguments)
        {
            Method = method;
            Arguments = arguments;
        }

        public void InvokeMethod()
        {
            Result = Method.DynamicInvoke(Arguments);
        }
    }
}

